var http = require('http');

var option = {
	host:'127.0.0.1', port:88, 
	path: '/sendMessageByUserIds',
	method: 'POST'
};

var request = http.request(option, function(response){
	if(response.statusCode === 200){
		console.log('请求数据成功!');
	}
	
	response.on('data', function(message){
		console.log('return result= ', message.toString());
	});
});


request.on('error', function(error){
	console.log('存在一些错误,错误信息: ', error.message);
});

var count = 1;

for(var i=0; i<10; i++){
	var data = {userIds:'dafgxzcsa', type:'alert', index:count};
	request.write(require('querystring').stringify(data));
	
	count++;
}

	
request.end();
	
	



